#include <stdio.h>
#include<iostream>
using namespace std;
class CBase
{
public:
    CBase()
    {
        m = 0;
        n = 0;
    }
    virtual void Test()
    {
        m = 0;
        n = 0;
        printf("Test : m = % d, n = % d\n", m, n);
    };
    void Test1()
    {
        printf("Test1 : m = % d, n = % d\n", m, n);
    }
protected:
    int m;
    int n;
};
class CDerive : public CBase
{
public:
    CDerive()
    {
        m++;
        n++;
    };
    virtual void Test()
    {
        printf("Test : m = % d, n = % d\n", m, n);
    }
    void Test1()
    {
        printf("Test1 : m = % d, n = % d\n", m, n);
    }
};
int main()
{
    CBase base;
    CDerive Derive;
    CBase *pBaseArray[2] = {&base, &Derive};
    pBaseArray[0]->Test(); 
    pBaseArray[1]->Test();
    pBaseArray[0]->Test1();
    pBaseArray[1]->Test1();
    return 0;
}
